3.7.58 \(\int \sqrt {e \cos (c+d x)} (a+i a \tan (c+d x)) \, dx\) [658]

Optimal. Leaf size=60 \[ -\frac {2 i a \sqrt {e \cos (c+d x)}}{d}+\frac {2 a \sqrt {e \cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)}} \]

[Out]

-2*I*a*(e*cos(d*x+c))^(1/2)/d+2*a*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d*x+1/2*c)
,2^(1/2))*(e*cos(d*x+c))^(1/2)/d/cos(d*x+c)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3596, 3567, 3856, 2719} \begin {gather*} \frac {2 a E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {e \cos (c+d x)}}{d \sqrt {\cos (c+d x)}}-\frac {2 i a \sqrt {e \cos (c+d x)}}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[e*Cos[c + d*x]]*(a + I*a*Tan[c + d*x]),x]

[Out]

((-2*I)*a*Sqrt[e*Cos[c + d*x]])/d + (2*a*Sqrt[e*Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2])/(d*Sqrt[Cos[c + d*x]]
)

Rule 2719

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{
c, d}, x]

Rule 3567

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*((d*Sec[
e + f*x])^m/(f*m)), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 3596

Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(d*Co
s[e + f*x])^m*(d*Sec[e + f*x])^m, Int[(a + b*Tan[e + f*x])^n/(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e,
f, m, n}, x] &&  !IntegerQ[m]

Rule 3856

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Dist[(b*Csc[c + d*x])^n*Sin[c + d*x]^n, Int[1/Sin[c + d
*x]^n, x], x] /; FreeQ[{b, c, d}, x] && EqQ[n^2, 1/4]

Rubi steps

\begin {align*} \int \sqrt {e \cos (c+d x)} (a+i a \tan (c+d x)) \, dx &=\left (\sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}\right ) \int \frac {a+i a \tan (c+d x)}{\sqrt {e \sec (c+d x)}} \, dx\\ &=-\frac {2 i a \sqrt {e \cos (c+d x)}}{d}+\left (a \sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}\right ) \int \frac {1}{\sqrt {e \sec (c+d x)}} \, dx\\ &=-\frac {2 i a \sqrt {e \cos (c+d x)}}{d}+\frac {\left (a \sqrt {e \cos (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx}{\sqrt {\cos (c+d x)}}\\ &=-\frac {2 i a \sqrt {e \cos (c+d x)}}{d}+\frac {2 a \sqrt {e \cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
time = 0.69, size = 244, normalized size = 4.07 \begin {gather*} \frac {a e e^{-i (c+d x)} (i+\cot (c)) \left (3 \sqrt {1-i e^{i (c+d x)}} \sqrt {e^{i (c+d x)} \left (-i+e^{i (c+d x)}\right )} E\left (\left .\text {ArcSin}\left (\sqrt {-i \cos (c+d x)+\sin (c+d x)}\right )\right |-1\right )-3 \sqrt {1-i e^{i (c+d x)}} \sqrt {e^{i (c+d x)} \left (-i+e^{i (c+d x)}\right )} F\left (\left .\text {ArcSin}\left (\sqrt {-i \cos (c+d x)+\sin (c+d x)}\right )\right |-1\right )+e^{2 i d x} \sqrt {1+e^{2 i (c+d x)}} \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i (c+d x)}\right )\right )}{3 d \sqrt {e \cos (c+d x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[e*Cos[c + d*x]]*(a + I*a*Tan[c + d*x]),x]

[Out]

(a*e*(I + Cot[c])*(3*Sqrt[1 - I*E^(I*(c + d*x))]*Sqrt[E^(I*(c + d*x))*(-I + E^(I*(c + d*x)))]*EllipticE[ArcSin
[Sqrt[(-I)*Cos[c + d*x] + Sin[c + d*x]]], -1] - 3*Sqrt[1 - I*E^(I*(c + d*x))]*Sqrt[E^(I*(c + d*x))*(-I + E^(I*
(c + d*x)))]*EllipticF[ArcSin[Sqrt[(-I)*Cos[c + d*x] + Sin[c + d*x]]], -1] + E^((2*I)*d*x)*Sqrt[1 + E^((2*I)*(
c + d*x))]*Hypergeometric2F1[1/2, 3/4, 7/4, -E^((2*I)*(c + d*x))]))/(3*d*E^(I*(c + d*x))*Sqrt[e*Cos[c + d*x]])

________________________________________________________________________________________

Maple [A]
time = 0.82, size = 108, normalized size = 1.80

method result size
default \(\frac {2 a e \left (2 i \left (\sin ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) e +e}\, d}\) \(108\)
risch \(-\frac {2 i \sqrt {2}\, a \sqrt {e \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) {\mathrm e}^{-i \left (d x +c \right )}}}{d}-\frac {i \left (-\frac {2 \left (e \,{\mathrm e}^{2 i \left (d x +c \right )}+e \right )}{e \sqrt {{\mathrm e}^{i \left (d x +c \right )} \left (e \,{\mathrm e}^{2 i \left (d x +c \right )}+e \right )}}+\frac {i \sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\, \sqrt {2}\, \sqrt {i \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}\, \sqrt {i {\mathrm e}^{i \left (d x +c \right )}}\, \left (-2 i \EllipticE \left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )+i \EllipticF \left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )\right )}{\sqrt {e \,{\mathrm e}^{3 i \left (d x +c \right )}+e \,{\mathrm e}^{i \left (d x +c \right )}}}\right ) \sqrt {2}\, a \sqrt {e \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) {\mathrm e}^{-i \left (d x +c \right )}}\, \sqrt {e \,{\mathrm e}^{i \left (d x +c \right )} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}\) \(301\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*cos(d*x+c))^(1/2)*(a+I*a*tan(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

2/sin(1/2*d*x+1/2*c)/(-2*sin(1/2*d*x+1/2*c)^2*e+e)^(1/2)*a*e*(2*I*sin(1/2*d*x+1/2*c)^3+(sin(1/2*d*x+1/2*c)^2)^
(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))-I*sin(1/2*d*x+1/2*c))/d

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*cos(d*x+c))^(1/2)*(a+I*a*tan(d*x+c)),x, algorithm="maxima")

[Out]

e^(1/2)*integrate((I*a*tan(d*x + c) + a)*sqrt(cos(d*x + c)), x)

________________________________________________________________________________________

Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.08, size = 26, normalized size = 0.43 \begin {gather*} \frac {2 i \, \sqrt {2} a e^{\frac {1}{2}} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, e^{\left (i \, d x + i \, c\right )}\right )\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*cos(d*x+c))^(1/2)*(a+I*a*tan(d*x+c)),x, algorithm="fricas")

[Out]

2*I*sqrt(2)*a*e^(1/2)*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, e^(I*d*x + I*c)))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} i a \left (\int \left (- i \sqrt {e \cos {\left (c + d x \right )}}\right )\, dx + \int \sqrt {e \cos {\left (c + d x \right )}} \tan {\left (c + d x \right )}\, dx\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*cos(d*x+c))**(1/2)*(a+I*a*tan(d*x+c)),x)

[Out]

I*a*(Integral(-I*sqrt(e*cos(c + d*x)), x) + Integral(sqrt(e*cos(c + d*x))*tan(c + d*x), x))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*cos(d*x+c))^(1/2)*(a+I*a*tan(d*x+c)),x, algorithm="giac")

[Out]

integrate((I*a*tan(d*x + c) + a)*sqrt(cos(d*x + c))*e^(1/2), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \sqrt {e\,\cos \left (c+d\,x\right )}\,\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*cos(c + d*x))^(1/2)*(a + a*tan(c + d*x)*1i),x)

[Out]

int((e*cos(c + d*x))^(1/2)*(a + a*tan(c + d*x)*1i), x)

________________________________________________________________________________________